]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
gnome-shell-build-setup.sh: install git-bz
authorOwen W. Taylor <otaylor@fishsoup.net>
Wed, 3 Oct 2012 04:03:14 +0000 (00:03 -0400)
committerOwen W. Taylor <otaylor@fishsoup.net>
Wed, 3 Oct 2012 13:49:39 +0000 (09:49 -0400)
Someone starting gnome-shell development work needs git-bz set up.
Install it into the user account much like we install jhbuild.

(Getting git-bz packaged into distributions would be better, but
this improves thing easily.)

https://bugzilla.gnome.org/show_bug.cgi?id=685354

tools/build/gnome-shell-build-setup.sh

index 203577af2b4ef476fb1b4a23126a8870a249575a..e04f84deb08a988349bf747985cfea1ad84792e8 100755 (executable)
@@ -246,22 +246,29 @@ if [ -d $SOURCE ] ; then : ; else
     echo "Created $SOURCE"
 fi
 
-if [ -d $SOURCE/jhbuild ] ; then
-    if [ -d $SOURCE/jhbuild/.git ] ; then
-        echo -n "Updating jhbuild ... "
-        ( cd $SOURCE/jhbuild && git pull --rebase > /dev/null ) || exit 1
-        echo "done"
+checkout_git() {
+    module=$1
+    source=$2
+
+    if [ -d $SOURCE/$1 ] ; then
+        if [ -d $SOURCE/$1/.git ] ; then
+            echo -n "Updating $1 ... "
+            ( cd $SOURCE/$1 && git pull --rebase > /dev/null ) || exit 1
+            echo "done"
+        else
+            echo "$SOURCE/$1 is not a git repository"
+            echo "You should remove it and rerun this script"
+            exit 1
+        fi
     else
-        echo "$SOURCE/jhbuild is not a git repository"
-        echo "You should remove it and rerun this script"
-       exit 1
+        echo -n "Checking out $1 into $SOURCE/$1 ... "
+        cd $SOURCE
+        git clone $2 > /dev/null || exit 1
+        echo "done"
     fi
-else
-    echo -n "Checking out jhbuild into $SOURCE/jhbuild ... "
-    cd $SOURCE
-    git clone git://git.gnome.org/jhbuild > /dev/null || exit 1
-    echo "done"
-fi
+}
+
+checkout_git jhbuild git://git.gnome.org/jhbuild
 
 echo -n "Installing jhbuild ... "
 (cd $SOURCE/jhbuild &&
@@ -294,4 +301,17 @@ if test "x`echo $PATH | grep $HOME/bin`" = x; then
     echo
 fi
 
+checkout_git git-bz git://git.fishsoup.net/git-bz
+
+
+echo -n "Installing git-bz ... "
+old="`readlink $HOME/bin/git-bz`"
+( cd $HOME/bin && ln -sf ../Source/git-bz/git-bz . )
+new="`readlink $HOME/bin/git-bz`"
+echo "done"
+
+if test "$old" != "$new" ; then
+    echo "WARNING: $HOME/bin/git-bz was changed from '$old' to '$new'"
+fi
+
 echo "Done."